package com.qcby.service.Impl;

import com.qcby.dao.SaleMapper;
import com.qcby.dao.UserIntegralMapper;
import com.qcby.service.UserIntegralService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Tom
 * @Date: 2021/07/23/16:28
 * @Description:
 */
@Service
public class UserIntegralServiceImpl implements UserIntegralService {
    @Autowired
    private UserIntegralMapper userIntegralMapper;

  @Override
  public void updataByPrice(Integer id, Integer price) {
    userIntegralMapper.updateByPrice(id,price);
  }

  @Override
  public Integer selectPrice(Integer i) {
    return userIntegralMapper.selectPrice(i);
  }

  @Override
  public Integer selectIntegralByUserId(Integer i) {
    Integer integral = userIntegralMapper.selectIntegralByUserId(i);
    return integral;
  }

  @Override
  public void updataBySale(Integer integral,Integer i) {
    userIntegralMapper.updateBySale(integral,i);
  }
}
